package com.yiyuan.app.service;

import com.alipay.api.AlipayApiException;
import com.guaike.core.entity.result.Result;
import com.yiyuan.app.entity.param.IosPayResultDTO;
import com.yiyuan.app.entity.param.RepayDTO;
import com.yiyuan.app.entity.param.UseEquityDTO;
import com.yiyuan.app.entity.result.RepayVO;

import java.io.IOException;


public interface PayService {
    /**
     * 预支付请求
     * @param param
     * @return
     */
    Result<RepayVO> repayProduct(RepayDTO param) throws AlipayApiException;

    /**
     * 使用特权
     * @param param
     * @return
     */
    Result<Boolean> useEquity(UseEquityDTO param) throws IOException, InterruptedException;

    /**
     * 苹果支付成功结构校验
     * @param param
     * @return
     */
    Result<Boolean> dealIosPayResult(IosPayResultDTO param) throws Exception;
}
